<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles"
	prefix="tiles"%>

<rich:panel header="#{messages['rci.bulk.bank.mgmt.label']}">
	<h:panelGrid>
		<h:outputText value="#{errorBean.errorMessage}" styleClass="error"></h:outputText>
	</h:panelGrid>
	
	<h:panelGrid width="100%">
		<h:panelGroup>
		    <h:outputText value="#{messages['rci.bulk.bank.deposit.label']}" styleClass="sub_header" />
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputText value="#{messages['instruction']}" styleClass="standardText_Instruction" />
		</h:panelGroup>
	</h:panelGrid>
	
	<t:panelGrid columns="2" columnClasses="standardTable_ColumnLeft_20,standardTable_ColumnLeft_80" width="100%">
		<h:outputText></h:outputText>
		<t:message for="year" styleClass="error"></t:message>
		<h:panelGroup>
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="year" value="#{messages['rci.bulk.bank.year.label']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<t:inputText id="year"  readonly="true" size="5" maxlength="5" styleClass="standardText" value="#{adminRCIBean.rciBulkBank.year}"></t:inputText>
		
		
		<h:outputText></h:outputText>
		<t:message for="partner" styleClass="error"></t:message>
		<h:panelGroup>
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="partner" value="#{messages['rci.bulk.bank.partner.label']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
			<t:selectOneMenu id="partner" styleClass="standardText" value="#{adminRCIBean.partner.partnerId}"  readonly="true">
				<f:selectItem itemLabel="#{messages['please.select']}" itemValue="" />
				<f:selectItems value="#{adminRCIBean.selectPartnerList}"/>
				<a4j:support ajaxSingle="true" event="onclick" reRender="product"></a4j:support>
			</t:selectOneMenu>
		</h:panelGroup>
		
		<h:outputText></h:outputText>
		<t:message for="product" styleClass="error"></t:message>
		<h:panelGroup>
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="product" value="#{messages['rci.bulk.bank.product.label']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
			<t:selectOneMenu id="product" styleClass="standardText" value="#{adminRCIBean.partnerProduct.partnerProductId}" readonly="true">
				<f:selectItem itemLabel="#{messages['please.select']}" itemValue="" />
				<f:selectItems value="#{adminRCIBean.selectProductList}"/>
			</t:selectOneMenu>
		</h:panelGroup>
		
		<h:outputText></h:outputText>
		<t:message for="room1No" styleClass="error"></t:message>
		<h:panelGroup>
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="room1No" value="#{messages['rci.bulk.bank.room.1.no.label']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<t:inputText id="room1No" required="true" size="20" maxlength="20" styleClass="standardText" value="#{adminRCIBean.rciBulkBank.room1No}"></t:inputText>
		
		
		<h:outputLabel for="room2No" value="#{messages['rci.bulk.bank.room.2.no.label']}" styleClass="standardText_Label" />
		<t:inputText id="room2No" required="false" size="20" maxlength="20" styleClass="standardText" value="#{adminRCIBean.rciBulkBank.room2No}"></t:inputText>
		
		<h:outputText></h:outputText>
		<t:message for="maxPax" styleClass="error"></t:message>
		<h:panelGroup>
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="maxPax" value="#{messages['rci.bulk.bank.max.pax.label']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<t:inputText id="maxPax" required="true" size="3" maxlength="3" styleClass="standardText" value="#{adminRCIBean.rciBulkBank.maxPax}"></t:inputText>
		
		
		<h:panelGroup>
	    	<h:outputText value="*" styleClass="standardText_Mandatory" />	
		    <h:outputLabel for="effectiveDate" value="#{messages['start.date.label']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
             <t:inputText id="effectiveDate" readonly="true" size="10" maxlength="10" styleClass="standardText" value="#{adminRCIBean.rciBulkBank.effectiveDate}">
                <f:convertDateTime pattern="dd/MM/yyyy" timeZone="Asia/Kuala_Lumpur"/>
             </t:inputText>
			<%-- 
		    	<t:inputCalendar
		    	id="effectiveDate"
					monthYearRowClass="yearMonthHeader" weekRowClass="weekHeader" 
					currentDayCellClass="currentDayCell" value="#{adminRCIBean.rciBulkBank.effectiveDate}"
					renderAsPopup="true" popupTodayString="#{messages['popup.today']}"
					popupWeekString="#{messages['popup.week']}" popupDateFormat="dd/MM/yyyy"
					renderPopupButtonAsImage="true"
					styleClass="standardText" readonly="true"
		    	>
		    	</t:inputCalendar>
		    	--%>
		</h:panelGroup>
		<%-- 
		<h:panelGroup>
	    	<h:outputText value="*" styleClass="standardText_Mandatory" />	
		    <h:outputLabel for="expiryDate" value="#{messages['expiry.date.label']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
		    	<t:inputCalendar
		    	id="expiryDate"
					monthYearRowClass="yearMonthHeader" weekRowClass="weekHeader" 
					currentDayCellClass="currentDayCell" value="#{adminRCIBean.rciBulkBank.expiryDate}"
					renderAsPopup="true" popupTodayString="#{messages['popup.today']}"
					popupWeekString="#{messages['popup.week']}" popupDateFormat="dd/MM/yyyy"
					renderPopupButtonAsImage="true"
					styleClass="standardText" required="true"
		    	>
		    	</t:inputCalendar>
		</h:panelGroup>
		--%>
		
		<rich:spacer height="10"></rich:spacer>
		
		<t:panelGroup>
		   <t:panelGrid columns="2">
		   		<h:commandButton value="#{messages['update']}" styleClass="button" action="#{adminRCIBean.updateRCIBulkBankAction}" actionListener="#{adminRCIBean.updateRCIBulkBankActionEvent}"></h:commandButton>
			    <h:commandButton value="#{messages['back']}" styleClass="button" action="#{adminRCIBean.initRCIBulkBankAction}" immediate="true"></h:commandButton>
		   </t:panelGrid>
		</t:panelGroup>
	</t:panelGrid>
</rich:panel>	